<?php
namespace Home\Controller;
use Think\Controller;
use Home\Model\UserModel;

/**
 * 用户控制器
 * @author Bean
 *
 */
class UserController extends Controller {
	
	//注册用户行为返回给Ajax
	public function reg() {
		if(IS_POST) {
			$User = new UserModel();
			$uid  = $User->reg(I('username'), I('password'), I('email'));
			echo $uid;
		}else {
			$this->error('非法访问！');
		}
	}
}

?>